package io.github.jkindwall.tabledriver.table;

import io.github.jkindwall.tabledriver.Table;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;

/**
 * @Author lin
 * @date 2022年06月27日 3:30 PM
 * @Description TODO
 **/
public class NoHeaderInTBODYTableTestsTower extends NoHeaderTableTestsBase {
    private static final String TABLE_ID = "l-grid-body-table";

    @Override
    protected Table getTestTable(){
        return Table.createWithNoHeaders(this.getDriver().findElement(By.id(NoHeaderInTBODYTableTestsTower.TABLE_ID)),0);
    }

    @Test
    public void noHeaderInTBODYTablePropertiesTest()
    {
        this.testTableProperties(NoHeaderInTBODYTableTestsTower.TABLE_ID);
    }

    @Test
    public void noHeaderInTBODYTableGetRowsTest()
    {
        this.testGetRows_tower();
    }

    @Test
    public void noHeaderInTBODYTableFindRowByBatch()
    {
        //S2021080322592 or S202110084745
        WebElement foundElement = this.getRowByColumnCellValue(3, "S202110084745");
        if (foundElement==null){
            System.out.println("未找到元素");
            return;
        }
        foundElement.click();
    }
}
